package com.zhentao.tot.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zhentao.tot.mapper.WmNewsMaterialMapper;
import com.zhentao.tot.domain.WmNewsMaterial;
import com.zhentao.tot.service.IWmNewsMaterialService;

/**
 * 自媒体图文引用素材信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-17
 */
@Service
public class WmNewsMaterialServiceImpl implements IWmNewsMaterialService 
{
    @Autowired
    private WmNewsMaterialMapper wmNewsMaterialMapper;

    /**
     * 查询自媒体图文引用素材信息
     * 
     * @param id 自媒体图文引用素材信息主键
     * @return 自媒体图文引用素材信息
     */
    @Override
    public WmNewsMaterial selectWmNewsMaterialById(Integer id)
    {
        return wmNewsMaterialMapper.selectWmNewsMaterialById(id);
    }

    /**
     * 查询自媒体图文引用素材信息列表
     * 
     * @param wmNewsMaterial 自媒体图文引用素材信息
     * @return 自媒体图文引用素材信息
     */
    @Override
    public List<WmNewsMaterial> selectWmNewsMaterialList(WmNewsMaterial wmNewsMaterial)
    {
        return wmNewsMaterialMapper.selectWmNewsMaterialList(wmNewsMaterial);
    }

    /**
     * 新增自媒体图文引用素材信息
     * 
     * @param wmNewsMaterial 自媒体图文引用素材信息
     * @return 结果
     */
    @Override
    public int insertWmNewsMaterial(WmNewsMaterial wmNewsMaterial)
    {
        return wmNewsMaterialMapper.insertWmNewsMaterial(wmNewsMaterial);
    }

    /**
     * 修改自媒体图文引用素材信息
     * 
     * @param wmNewsMaterial 自媒体图文引用素材信息
     * @return 结果
     */
    @Override
    public int updateWmNewsMaterial(WmNewsMaterial wmNewsMaterial)
    {
        return wmNewsMaterialMapper.updateWmNewsMaterial(wmNewsMaterial);
    }

    /**
     * 批量删除自媒体图文引用素材信息
     * 
     * @param ids 需要删除的自媒体图文引用素材信息主键
     * @return 结果
     */
    @Override
    public int deleteWmNewsMaterialByIds(Integer[] ids)
    {
        return wmNewsMaterialMapper.deleteWmNewsMaterialByIds(ids);
    }

    /**
     * 删除自媒体图文引用素材信息信息
     * 
     * @param id 自媒体图文引用素材信息主键
     * @return 结果
     */
    @Override
    public int deleteWmNewsMaterialById(Integer id)
    {
        return wmNewsMaterialMapper.deleteWmNewsMaterialById(id);
    }
}
